package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * 电子证书编号生成
 */
@Data
@Document(collection = "ca_certificate_log")
@CompoundIndexes({
        @CompoundIndex(name = "certificateNo_ca_comIdx", def = "{'activityId':1,'userId':1,'caType':1," +
                "'caLevel':1}", unique = true)
})
public class CaCertificateLog extends EntityBase {

    /**
     * 用户ID
     */
    private String userId;


    private String activityId;

    private String caType;

    private String caLevel;

    /**
     * 手机号
     */
    @Indexed(background = true)
    private String mobile;

    @Indexed(unique = true)
    private String certificateNo;

    private Boolean certificateEnable = Boolean.TRUE;

    private String mark;

}
